package TestThree;

import java.text.DecimalFormat;

public class Telfee {
    public static String classify(String a, String b) {

        double Telfee;
        Telephone ht = new Telephone(a,b);
        DecimalFormat    df   = new DecimalFormat("######0.00");
        long minute = ( ht.getTelephone());
        //计算话费
        if(minute <= 20){
            Telfee = 0.05*minute;
        }else{
            Telfee = 1.00 + (minute - 20)*0.1;
        }
        return ("通话时间："+minute+"分钟;")+("通话话费："+df.format(Telfee)+"美元");
    }
}